<?php
class MagicBean {
	
	public $params = array();
	
	function __call($name, $args) {
		
		$op 	= @substr($name, 0, 3);
		$campo	= @substr($name, 3);
		
		
		if ($op == 'set' && @$campo[0] == @strtoupper($campo[0])) {
			$this->params[strtolower($campo)] = $args[0];
		} else
		
		if ($op == 'get' && @$campo[0] == @strtoupper($campo[0])) {
			return (isset($this->params[strtolower($campo)])? $this->params[strtolower($campo)]: "");
		} else {
			if (isset($args[0])) {
				$this->params[strtolower($name)] = $args[0];
			} else {
				return (isset($this->params[strtolower($name)])? $this->params[strtolower($name)]: "");
			}			
			
		}
		
		
		
	}
	
}
?>
